package top.csy8888.work1.controller;

import org.springframework.http.HttpStatus;
import top.csy8888.work1.controller.vo.ResultVO;

/**
 * @author CSY
 * @date 2025 - 09 - 12
 */
public class BaseController {
    protected <T> ResultVO<T> success(T data) {
        ResultVO<T> resultVO = new ResultVO<>();
        resultVO.setCode(HttpStatus.OK.value());
        resultVO.setData(data);
        return resultVO;
    }

    protected <T> ResultVO<T> success() {
        ResultVO<T> resultVO = new ResultVO<>();
        resultVO.setCode(HttpStatus.OK.value());
        return resultVO;
    }
}
